package cn.hashq.netpostclient.util;

import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class LogUtil {
    public static String convertStackInfoToStr(Throwable e) {
        StackTraceElement[] traceElements = e.getStackTrace();
        return Objects.nonNull(traceElements) ? (String) Stream.of(traceElements).map((t) -> {
            return t.toString();
        }).collect(Collectors.joining(";")) : "";
    }
}
